<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生信息管理系统</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-color: #4a90e2;
            --secondary-color: #5cb85c;
            --danger-color: #d9534f;
            --warning-color: #f0ad4e;
            --dark-color: #2c3e50;
            --light-color: #ecf0f1;
            --border-color: #ddd;
            --shadow: 0 2px 10px rgba(0,0,0,0.1);
            --transition: all 0.3s ease;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
            overflow: hidden;
        }

        header {
            background: linear-gradient(135deg, var(--primary-color), #3a7bc8);
            color: white;
            padding: 30px;
            text-align: center;
        }

        header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        .stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-top: 20px;
        }

        .stat-item {
            background: rgba(255,255,255,0.2);
            padding: 10px 20px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
        }

        .main-content {
            padding: 30px;
        }

        .toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .search-box {
            display: flex;
            gap: 10px;
            flex: 1;
            max-width: 500px;
        }

        .search-box input {
            flex: 1;
            padding: 12px 20px;
            border: 2px solid var(--border-color);
            border-radius: 25px;
            font-size: 16px;
            transition: var(--transition);
        }

        .search-box input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
        }

        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: #3a7bc8;
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .btn-success {
            background: var(--secondary-color);
            color: white;
        }

        .btn-danger {
            background: var(--danger-color);
            color: white;
        }

        .btn-warning {
            background: var(--warning-color);
            color: white;
        }

        .btn-sm {
            padding: 8px 15px;
            font-size: 14px;
        }

        .filters {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .filter-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filter-group select {
            padding: 8px 15px;
            border: 2px solid var(--border-color);
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
        }

        .filter-group select:focus {
            outline: none;
            border-color: var(--primary-color);
        }

        .table-container {
            overflow-x: auto;
            border-radius: 10px;
            box-shadow: var(--shadow);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
        }

        thead {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        th, td {
            padding: 15px;
            text-align: left;
        }

        th {
            font-weight: 600;
            text-transform: uppercase;
            font-size: 14px;
            letter-spacing: 0.5px;
        }

        tbody tr {
            border-bottom: 1px solid var(--border-color);
            transition: var(--transition);
        }

        tbody tr:hover {
            background: #f8f9fa;
            transform: scale(1.01);
        }

        .score-badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 15px;
            font-weight: 600;
            font-size: 14px;
        }

        .score-high {
            background: #d4edda;
            color: #155724;
        }

        .score-medium {
            background: #fff3cd;
            color: #856404;
        }

        .score-low {
            background: #f8d7da;
            color: #721c24;
        }

        .actions {
            display: flex;
            gap: 8px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            animation: fadeIn 0.3s;
        }

        .modal.active {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 15px;
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            animation: slideUp 0.3s;
        }

        .modal-header {
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--border-color);
        }

        .modal-header h2 {
            color: var(--dark-color);
            font-size: 1.8em;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--dark-color);
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-size: 16px;
            transition: var(--transition);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 2px solid var(--border-color);
        }

        .reward-list {
            max-height: 300px;
            overflow-y: auto;
            margin-top: 15px;
        }

        .reward-item {
            padding: 12px;
            margin-bottom: 10px;
            border-radius: 8px;
            border-left: 4px solid;
            background: #f8f9fa;
        }

        .reward-item.reward {
            border-left-color: var(--secondary-color);
            background: #d4edda;
        }

        .reward-item.punishment {
            border-left-color: var(--danger-color);
            background: #f8d7da;
        }

        .reward-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
        }

        .reward-type {
            font-weight: 600;
            font-size: 14px;
        }

        .reward-date {
            color: #666;
            font-size: 12px;
        }

        .reward-desc {
            color: var(--dark-color);
            line-height: 1.5;
        }

        .toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            padding: 15px 25px;
            background: var(--dark-color);
            color: white;
            border-radius: 8px;
            box-shadow: var(--shadow);
            transform: translateX(400px);
            transition: transform 0.3s;
            z-index: 2000;
        }

        .toast.show {
            transform: translateX(0);
        }

        .toast.success {
            background: var(--secondary-color);
        }

        .toast.error {
            background: var(--danger-color);
        }

        .toast.warning {
            background: var(--warning-color);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @media (max-width: 768px) {
            .toolbar {
                flex-direction: column;
            }

            .search-box {
                max-width: 100%;
            }

            .table-container {
                font-size: 14px;
            }

            th, td {
                padding: 10px;
            }

            .actions {
                flex-direction: column;
            }
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-state svg {
            width: 100px;
            height: 100px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>🎓 学生信息管理系统</h1>
            <div class="stats">
                <div class="stat-item">
                    <span>学生总数: </span>
                    <strong id="totalStudents">0</strong>
                </div>
                <div class="stat-item">
                    <span>平均评分: </span>
                    <strong id="avgScore">0</strong>
                </div>
                <div class="stat-item">
                    <span>班级数量: </span>
                    <strong id="totalClasses">0</strong>
                </div>
            </div>
        </header>

        <main class="main-content">
            <div class="toolbar">
                <div class="search-box">
                    <input type="text" id="searchInput" placeholder="搜索学号、姓名...">
                    <button class="btn btn-primary" onclick="searchStudents()">
                        🔍 搜索
                    </button>
                </div>
                <button class="btn btn-success" onclick="openAddModal()">
                    ➕ 添加学生
                </button>
            </div>

            <div class="filters">
                <div class="filter-group">
                    <label>班级筛选:</label>
                    <select id="classFilter" onchange="filterStudents()">
                        <option value="">全部班级</option>
                    </select>
                </div>
                <div class="filter-group">
                    <label>组别筛选:</label>
                    <select id="groupFilter" onchange="filterStudents()">
                        <option value="">全部组别</option>
                    </select>
                </div>
                <div class="filter-group">
                    <label>评分范围:</label>
                    <select id="scoreFilter" onchange="filterStudents()">
                        <option value="">全部评分</option>
                        <option value="high">90分以上</option>
                        <option value="medium">60-89分</option>
                        <option value="low">60分以下</option>
                    </select>
                </div>
            </div>

            <div class="table-container">
                <table id="studentTable">
                    <thead>
                        <tr>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>班级</th>
                            <th>组别</th>
                            <th>座位号</th>
                            <th>评分</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="studentTableBody">
                        <!-- 动态生成 -->
                    </tbody>
                </table>
                <div id="emptyState" class="empty-state" style="display: none;">
                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
                    </svg>
                    <h3>暂无学生数据</h3>
                    <p>点击"添加学生"按钮开始添加学生信息</p>
                </div>
            </div>
        </main>
    </div>

    <!-- 添加/编辑学生模态框 -->
    <div id="studentModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 id="modalTitle">添加学生</h2>
            </div>
            <form id="studentForm">
                <div class="form-group">
                    <label for="studentId">学号 *</label>
                    <input type="text" id="studentId" required>
                </div>
                <div class="form-group">
                    <label for="studentName">姓名 *</label>
                    <input type="text" id="studentName" required>
                </div>
                <div class="form-group">
                    <label for="className">班级 *</label>
                    <input type="text" id="className" required>
                </div>
                <div class="form-group">
                    <label for="groupName">组别 *</label>
                    <input type="text" id="groupName" required>
                </div>
                <div class="form-group">
                    <label for="seatNumber">座位号 *</label>
                    <input type="text" id="seatNumber" required>
                </div>
                <div class="form-group">
                    <label for="score">评分 (0-100)</label>
                    <input type="number" id="score" min="0" max="100" required>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" onclick="closeModal('studentModal')">取消</button>
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </form>
        </div>
    </div>

    <!-- 奖惩记录模态框 -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2>奖惩记录管理</h2>
                <p style="color: #666; margin-top: 5px;">学生: <span id="currentStudentName"></span></p>
            </div>
            
            <div class="form-group">
                <label for="rewardType">类型</label>
                <select id="rewardType">
                    <option value="reward">奖励</option>
                    <option value="punishment">惩罚</option>
                </select>
            </div>
            
            <div class="form-group">
                <label for="rewardDesc">描述</label>
                <textarea id="rewardDesc" placeholder="请输入奖惩描述..."></textarea>
            </div>
            
            <button class="btn btn-primary" onclick="addReward()" style="width: 100%; margin-bottom: 20px;">
                添加记录
            </button>
            
            <h3 style="margin-bottom: 15px;">历史记录</h3>
            <div id="rewardList" class="reward-list">
                <!-- 动态生成 -->
            </div>
            
            <div class="modal-footer">
                <button class="btn btn-danger" onclick="closeModal('rewardModal')">关闭</button>
            </div>
        </div>
    </div>

    <!-- Toast 提示 -->
    <div id="toast" class="toast"></div>

    <script>
        // 数据存储
        let students = JSON.parse(localStorage.getItem('students')) || [];
        let currentEditId = null;
        let currentRewardStudentId = null;

        // 初始化
        document.addEventListener('DOMContentLoaded', function() {
            loadStudents();
            updateStats();
            updateFilters();
        });

        // 加载学生列表
        function loadStudents() {
            const tbody = document.getElementById('studentTableBody');
            const emptyState = document.getElementById('emptyState');
            
            if (students.length === 0) {
                tbody.innerHTML = '';
                emptyState.style.display = 'block';
                return;
            }
            
            emptyState.style.display = 'none';
            tbody.innerHTML = students.map(student => `
                <tr>
                    <td>${student.id}</td>
                    <td><strong>${student.name}</strong></td>
                    <td>${student.className}</td>
                    <td>${student.groupName}</td>
                    <td>${student.seatNumber}</td>
                    <td>
                        <span class="score-badge ${getScoreClass(student.score)}">
                            ${student.score}分
                        </span>
                    </td>
                    <td>
                        <div class="actions">
                            <button class="btn btn-warning btn-sm" onclick="editStudent('${student.id}')">
                                ✏️ 编辑
                            </button>
                            <button class="btn btn-success btn-sm" onclick="openRewardModal('${student.id}')">
                                🏆 奖惩
                            </button>
                            <button class="btn btn-danger btn-sm" onclick="deleteStudent('${student.id}')">
                                🗑️ 删除
                            </button>
                        </div>
                    </td>
                </tr>
            `).join('');
        }

        // 获取评分样式类
        function getScoreClass(score) {
            if (score >= 90) return 'score-high';
            if (score >= 60) return 'score-medium';
            return 'score-low';
        }

        // 更新统计信息
        function updateStats() {
            document.getElementById('totalStudents').textContent = students.length;
            
            if (students.length > 0) {
                const avgScore = (students.reduce((sum, s) => sum + parseInt(s.score), 0) / students.length).toFixed(1);
                document.getElementById('avgScore').textContent = avgScore;
                
                const classes = [...new Set(students.map(s => s.className))];
                document.getElementById('totalClasses').textContent = classes.length;
            } else {
                document.getElementById('avgScore').textContent = '0';
                document.getElementById('totalClasses').textContent = '0';
            }
        }

        // 更新筛选器选项
        function updateFilters() {
            const classes = [...new Set(students.map(s => s.className))];
            const groups = [...new Set(students.map(s => s.groupName))];
            
            const classFilter = document.getElementById('classFilter');
            const groupFilter = document.getElementById('groupFilter');
            
            classFilter.innerHTML = '<option value="">全部班级</option>' + 
                classes.map(c => `<option value="${c}">${c}</option>`).join('');
            
            groupFilter.innerHTML = '<option value="">全部组别</option>' + 
                groups.map(g => `<option value="${g}">${g}</option>`).join('');
        }

        // 打开添加学生模态框
        function openAddModal() {
            currentEditId = null;
            document.getElementById('modalTitle').textContent = '添加学生';
            document.getElementById('studentForm').reset();
            document.getElementById('studentModal').classList.add('active');
        }

        // 编辑学生
        function editStudent(id) {
            const student = students.find(s => s.id === id);
            if (!student) return;
            
            currentEditId = id;
            document.getElementById('modalTitle').textContent = '编辑学生';
            document.getElementById('studentId').value = student.id;
            document.getElementById('studentName').value = student.name;
            document.getElementById('className').value = student.className;
            document.getElementById('groupName').value = student.groupName;
            document.getElementById('seatNumber').value = student.seatNumber;
            document.getElementById('score').value = student.score;
            
            document.getElementById('studentModal').classList.add('active');
        }

        // 保存学生信息
        document.getElementById('studentForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const studentData = {
                id: document.getElementById('studentId').value,
                name: document.getElementById('studentName').value,
                className: document.getElementById('className').value,
                groupName: document.getElementById('groupName').value,
                seatNumber: document.getElementById('seatNumber').value,
                score: document.getElementById('score').value,
                rewards: []
            };
            
            if (currentEditId) {
                // 编辑模式
                const index = students.findIndex(s => s.id === currentEditId);
                if (index !== -1) {
                    studentData.rewards = students[index].rewards || [];
                    students[index] = studentData;
                    showToast('学生信息更新成功', 'success');
                }
            } else {
                // 添加模式
                if (students.find(s => s.id === studentData.id)) {
                    showToast('学号已存在', 'error');
                    return;
                }
                students.push(studentData);
                showToast('学生添加成功', 'success');
            }
            
            saveData();
            loadStudents();
            updateStats();
            updateFilters();
            closeModal('studentModal');
        });

        // 删除学生
        function deleteStudent(id) {
            if (confirm('确定要删除这个学生吗？此操作不可恢复！')) {
                students = students.filter(s => s.id !== id);
                saveData();
                loadStudents();
                updateStats();
                updateFilters();
                showToast('学生删除成功', 'success');
            }
        }

        // 打开奖惩记录模态框
        function openRewardModal(studentId) {
            currentRewardStudentId = studentId;
            const student = students.find(s => s.id === studentId);
            if (!student) return;
            
            document.getElementById('currentStudentName').textContent = student.name;
            loadRewards();
            document.getElementById('rewardModal').classList.add('active');
        }

        // 加载奖惩记录
        function loadRewards() {
            const student = students.find(s => s.id === currentRewardStudentId);
            if (!student) return;
            
            const rewardList = document.getElementById('rewardList');
            const rewards = student.rewards || [];
            
            if (rewards.length === 0) {
                rewardList.innerHTML = '<p style="text-align: center; color: #999;">暂无奖惩记录</p>';
                return;
            }
            
            rewardList.innerHTML = rewards.map((reward, index) => `
                <div class="reward-item ${reward.type}">
                    <div class="reward-header">
                        <span class="reward-type">${reward.type === 'reward' ? '🏆 奖励' : '⚠️ 惩罚'}</span>
                        <span class="reward-date">${reward.date}</span>
                    </div>
                    <div class="reward-desc">${reward.description}</div>
                    <button class="btn btn-danger btn-sm" onclick="deleteReward(${index})" style="margin-top: 10px;">
                        删除
                    </button>
                </div>
            `).join('');
        }

        // 添加奖惩记录
        function addReward() {
            const type = document.getElementById('rewardType').value;
            const description = document.getElementById('rewardDesc').value.trim();
            
            if (!description) {
                showToast('请输入奖惩描述', 'warning');
                return;
            }
            
            const student = students.find(s => s.id === currentRewardStudentId);
            if (!student) return;
            
            if (!student.rewards) {
                student.rewards = [];
            }
            
            student.rewards.push({
                type: type,
                description: description,
                date: new Date().toLocaleDateString('zh-CN')
            });
            
            saveData();
            loadRewards();
            document.getElementById('rewardDesc').value = '';
            showToast('奖惩记录添加成功', 'success');
        }

        // 删除奖惩记录
        function deleteReward(index) {
            const student = students.find(s => s.id === currentRewardStudentId);
            if (!student) return;
            
            student.rewards.splice(index, 1);
            saveData();
            loadRewards();
            showToast('奖惩记录删除成功', 'success');
        }

        // 搜索学生
        function searchStudents() {
            const searchTerm = document.getElementById('searchInput').value.toLowerCase();
            
            if (!searchTerm) {
                loadStudents();
                return;
            }
            
            const filtered = students.filter(s => 
                s.id.toLowerCase().includes(searchTerm) || 
                s.name.toLowerCase().includes(searchTerm)
            );
            
            displayFilteredStudents(filtered);
        }

        // 筛选学生
        function filterStudents() {
            const classFilter = document.getElementById('classFilter').value;
            const groupFilter = document.getElementById('groupFilter').value;
            const scoreFilter = document.getElementById('scoreFilter').value;
            
            let filtered = students;
            
            if (classFilter) {
                filtered = filtered.filter(s => s.className === classFilter);
            }
            
            if (groupFilter) {
                filtered = filtered.filter(s => s.groupName === groupFilter);
            }
            
            if (scoreFilter) {
                filtered = filtered.filter(s => {
                    const score = parseInt(s.score);
                    if (scoreFilter === 'high') return score >= 90;
                    if (scoreFilter === 'medium') return score >= 60 && score < 90;
                    if (scoreFilter === 'low') return score < 60;
                    return true;
                });
            }
            
            displayFilteredStudents(filtered);
        }

        // 显示筛选后的学生
        function displayFilteredStudents(filtered) {
            const tbody = document.getElementById('studentTableBody');
            const emptyState = document.getElementById('emptyState');
            
            if (filtered.length === 0) {
                tbody.innerHTML = '';
                emptyState.style.display = 'block';
                emptyState.innerHTML = `
                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
                    </svg>
                    <h3>没有找到匹配的学生</h3>
                    <p>请尝试调整搜索条件或筛选器</p>
                `;
                return;
            }
            
            emptyState.style.display = 'none';
            tbody.innerHTML = filtered.map(student => `
                <tr>
                    <td>${student.id}</td>
                    <td><strong>${student.name}</strong></td>
                    <td>${student.className}</td>
                    <td>${student.groupName}</td>
                    <td>${student.seatNumber}</td>
                    <td>
                        <span class="score-badge ${getScoreClass(student.score)}">
                            ${student.score}分
                        </span>
                    </td>
                    <td>
                        <div class="actions">
                            <button class="btn btn-warning btn-sm" onclick="editStudent('${student.id}')">
                                ✏️ 编辑
                            </button>
                            <button class="btn btn-success btn-sm" onclick="openRewardModal('${student.id}')">
                                🏆 奖惩
                            </button>
                            <button class="btn btn-danger btn-sm" onclick="deleteStudent('${student.id}')">
                                🗑️ 删除
                            </button>
                        </div>
                    </td>
                </tr>
            `).join('');
        }

        // 关闭模态框
        function closeModal(modalId) {
            document.getElementById(modalId).classList.remove('active');
        }

        // 点击模态框外部关闭
        document.querySelectorAll('.modal').forEach(modal => {
            modal.addEventListener('click', function(e) {
                if (e.target === this) {
                    this.classList.remove('active');
                }
            });
        });

        // 保存数据到 localStorage
        function saveData() {
            localStorage.setItem('students', JSON.stringify(students));
        }

        // 显示 Toast 提示
        function showToast(message, type = 'success') {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.className = `toast ${type}`;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 3000);
        }

        // 添加一些示例数据（首次加载时）
        if (students.length === 0) {
            students = [
                {
                    id: '2024001',
                    name: '张三',
                    className: '高三(1)班',
                    groupName: '第一组',
                    seatNumber: 'A01',
                    score: 95,
                    rewards: [
                        { type: 'reward', description: '数学竞赛一等奖', date: '2024-01-15' },
                        { type: 'reward', description: '优秀学生干部', date: '2024-02-20' }
                    ]
                },
                {
                    id: '2024002',
                    name: '李四',
                    className: '高三(1)班',
                    groupName: '第二组',
                    seatNumber: 'A02',
                    score: 88,
                    rewards: [
                        { type: 'punishment', description: '迟到一次', date: '2024-03-01' }
                    ]
                },
                {
                    id: '2024003',
                    name: '王五',
                    className: '高三(2)班',
                    groupName: '第一组',
                    seatNumber: 'B01',
                    score: 76,
                    rewards: []
                },
                {
                    id: '2024004',
                    name: '赵六',
                    className: '高三(2)班',
                    groupName: '第三组',
                    seatNumber: 'B02',
                    score: 92,
                    rewards: [
                        { type: 'reward', description: '英语演讲比赛二等奖', date: '2024-02-10' }
                    ]
                },
                {
                    id: '2024005',
                    name: '钱七',
                    className: '高三(3)班',
                    groupName: '第二组',
                    seatNumber: 'C01',
                    score: 58,
                    rewards: [
                        { type: 'punishment', description: '作业未完成', date: '2024-03-05' },
                        { type: 'punishment', description: '课堂纪律问题', date: '2024-03-10' }
                    ]
                }
            ];
            saveData();
            loadStudents();
            updateStats();
            updateFilters();
        }
    </script>
</body>
</html>